<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>商家注册</title>
<link rel="stylesheet" href="css/amazeui.min.css">
    <link rel="stylesheet" href="css/petshow.css?6">
    <link rel="stylesheet" href="css/animate.min.css">
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css" />
<script src="js/jquery-1.11.3.min.js" type="text/javascript"></script>
<script src="js/bootstrap.min.js" type="text/javascript"></script>

<!-- 引入自定义css文件 style.css -->
<link rel="stylesheet" href="css/bus-style.css" type="text/css" />

<style>
body {
	margin-top: 80px;
	margin: 0 auto;
}

.carousel-inner .item img {
	width: 100%;
	height: 300px;
}

.container .row div {
	/* position:relative;
	 float:left; */
	
}

font {
	color: #3164af;
	font-size: 18px;
	font-weight: normal;
	padding: 0 10px;
}

.error{
  color:red;
}
</style>


<script type="text/javascript">

  function checkInput(){
	  
	  //获取到用户名输入框输入的值
	   var value = $("#userid").val();
	  //获取密码
	   var pass= $("#pass").val();
	  
	
	    
	    if(value.trim().length == 0){
	    	
	    	  $("#codeSpan").addClass("error");
			  $("#codeSpan").html("用户名不能为空");
	    }else{
	    	
	    	$("#codeSpan").removeClass("error");
			  $("#codeSpan").html("");
	    	
	    }
	  
  }   
	    
        function checkForm(){
	    	
	    	//首先在提交前执行一下验证码  因为可能会有人直接提交  虽然说这样啥也没写 不会登陆  但是
	    	
	    	//为了完整还是写上
	    	checkInput();
	    	//进行判断  如果说选择器 error的数量 存在 说明是存在错误的需要禁止表单提交
	    	
	    	if($(".error").size() > 0){
	    		
	    		return false;
	    	}
	    	
	    	  
	    }
  

</script>
</head>
<body>


	<div class="container"
		style="width: 100%; height:100%; background: url('img/bg1.jpg');">
		<div class="row">

			<div class="col-md-2"></div>

			<div class="col-md-8"
				style="background: #fff; padding: 40px 80px; margin: 30px; border: 7px solid #ccc;">
				<font>商家注册</font>BUSINESS REGISTE————开启属于你的味道
				<form class="form-horizontal" style="margin-top: 5px;" 
				action="${pageContext.request.contextPath }/RegistServlet" method="post" onsubmit="return reg(this)">
					<div class="form-group">
						<label for="username" class="col-sm-2 control-label">用户名</label>
						<div class="col-sm-6">
							<input type="text" class="form-control" name="u_name"
								placeholder="请输入用户名" onblur="checkInput()" id="userid">
						</div>
					</div>
					<input type="hidden" name="u_identify" value="2">
					<div>
					<span id="codeSpan" style="FONT-WEIGHT: bold;"></span>
					</div>
					<div class="form-group">
						<label for="inputPassword3" class="col-sm-2 control-label">密码</label>
						<div class="col-sm-6">
							<input type="password" class="form-control" name="u_pwd"
								placeholder="请输入密码" id="pass">
								
						</div>
					</div>
					<div class="form-group">
						<label for="confirmpwd" class="col-sm-2 control-label">确认密码</label>
						<div class="col-sm-6">
							<input type="password" class="form-control" name="reu_pwd"
								placeholder="请再次输入密码" id="pass">
						</div>
					</div>




					<div class="form-group">
						<div class="col-sm-offset-2 col-sm-10">
							<input type="submit" width="100" value="注册" name="submit"
								border="0"
								>
						</div>
					</div>
				</form>
			</div>

			<div class="col-md-2"></div>

		</div>
	</div>


<footer class="am_footer">
<div class="am_footer_con">
<div class="am_footer_link">
<span>关于食否</span>
<ul>
  <li><a href="###">关于我们</a></li>
  <li><a href="###">发展历程</a></li>
  <li><a href="###">友情链接</a></li>
</ul>
</div>


<div class="am_footer_don">
<span>食否</span>
<dl>
  <dt><img src="img/foodLogo.jpg?1" alt=""></dt>
  <dd>为您提供各类美食网上订餐服务，覆盖周边100余家餐厅，中餐、西餐、美食小吃、快餐、火锅、川菜应有尽有，不用出门即可享受各地区各种类美食！
  <a href="###" class="footdon_pg "><div class="foot_d_pg am-icon-apple ">  App store</div></a><a href="###" class="footdon_az animated"><div class="foot_d_az am-icon-android ">  Android</div></a></dd>

</dl>
</div>

<div class="am_footer_erweima">
<div class="am_footer_weixin"><img src="img/wx2.jpg" alt=""><div class="am_footer_d_gzwx am-icon-weixin"> 关注微信</div></div>
<div class="am_footer_ddon"><img src="img/wx.jpg" alt=""><div class="am_footer_d_dxz am-icon-cloud-download"> 扫码下载</div></div>

</div>

</div>
<div class="am_info_line">Copyright(c)2017 <span>ShiFou</span> All Rights Reserved </div>
</footer>
</body>
</html>